package cz.incad.psh.pshassign.client.rpc;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface PSHServiceAsync {
    void searchNusl(String q, AsyncCallback<String> callback);
    void getPSHKeys(String id, AsyncCallback<String> callback);
    void getDocVectors(String id, AsyncCallback<String> callback);
    
    void getOptions(AsyncCallback<String> callback) throws Exception;
    public void setOptions(String props, AsyncCallback<Void> asyncCallback);
    
    void getKeyNames(String id, AsyncCallback<String> callback)  throws Exception;
    
    public void cancelIndex(AsyncCallback<Void> asyncCallback);
    public void getCurrentIndex(AsyncCallback<java.lang.Integer> asyncCallback);
    public void getIsRunningIndex(AsyncCallback<java.lang.Integer> asyncCallback);
    void fullIndex(AsyncCallback<String> callback);
    void updateIndex(String from, AsyncCallback<String> callback);
    void indexPsh(AsyncCallback<String> callback);
    void updatePsh(String url, AsyncCallback<String> callback);
    void saveToInvenio(String xml, AsyncCallback<String> callback);
    
    void assign(boolean update, AsyncCallback<String> callback);
    void cancelAssign(AsyncCallback<Void> asyncCallback);
    public void getCurrentAssign(AsyncCallback<java.lang.Integer> asyncCallback);
    public void getIsRunningAssign(AsyncCallback<java.lang.Integer> asyncCallback);
    
    void getStopWords(AsyncCallback<String> callback) throws Exception;

    public void addStopWord(String word, AsyncCallback<Void> asyncCallback) throws Exception;
    public void removeStopWord(String word, AsyncCallback<Void> asyncCallback) throws Exception;
    
    void getInstitutions(AsyncCallback<String> callback) throws Exception;
    public void setInstitutions(String json, AsyncCallback<Void> asyncCallback);


}
